package com.wzxy.pf.intercept;
import com.wzxy.pf.budget.vo.MsgVo;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@ControllerAdvice
public class ReExcetion {
    @ExceptionHandler(Exception.class)
    @ResponseBody
    public MsgVo<Object> handlerException(Exception e, HttpServletRequest request){
        return new MsgVo<>(500,e.getMessage(),null);
    }
}